package com.learn.hibernatevalidator.chapter07.valueextractor.note;

import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.valueextraction.Unwrapping;
import lombok.Data;

import java.util.OptionalInt;

/**
 * @author: liyf
 * @create: 2025-01-19 14:02
 **/
@Data
public class Container {

    @NotNull(payload = Unwrapping.Skip.class)
    private OptionalInt opt1;

    @Min(2)
    @NotNull
    private OptionalInt opt2;


    @Min(value = 5, payload = Unwrapping.Unwrap.class)
    private OptionalInt opt3;
}
